Ektron CMS400.Net Reference
The ProductList Server control displays a list of products on a Web page.
Note: Private catalog entries appear in display of the Product List server control only if the user is logged in and has at least Read-Only permissions for its catalog folder. See Also: Private Content
You decide which products appear by selecting a SourceType and populating either the SourceId or the IdList property, depending on the source type. You can choose from these source types.
If you want to display |
Set the SourceType property to |
In the SourceId property, enter |
In the IdList property, enter |
All products for a selected catalog |
Catalog |
The ID of the catalog |
|
All products across multiple catalogs |
CatalogList |
|
A comma separated list of catalog IDs |
All products for a selected taxonomy |
Taxonomy |
The ID of the Taxonomy |
|
All products across multiple taxonomies |
TaxonomyList |
|
A comma separated list of taxonomy IDs |
All products for a selected collection | Collection | The ID of the Collection | |
Display a list of products |
IdList |
|
A comma separated list of product IDs |
The ProductList server control allows a site visitor to sort by:
Title
SKU
Price High to Low
Price Low to High
Highest Rated
Lowest Rated and Most Ratings
You can set the default sort order by setting the SortMode property.
For the Highest Rated, Lowest Rated and Most Ratings sorting options to work as intended, ContentReview server control should be associated with each product. (See Also: ContentReview Server Control) This allows site visitors to rate your products.
For example, place a ContentReview control on the Master page of the template that display products, and set its DynamicParameter property to ID. Then, when site visitors view the product, they can rate and comment on it.
There are several ways site visitors might arrive at the ProductList server control, such as
when a list of products appears on the side of a page
through a link in a master page
when they click Continue Shopping on the Cart or Checkout server control.
The following table explains the properties of the ProductList server control.
Note: The following table only lists Ektron-specific properties. It does not describe native .NET properties such as font, height, width and border style. For documentation of these properties, see Visual Studio help.
Property |
Description |
Data Type |
Authenticated |
Indicates if you are logged in to the CMS Explorer |
String |
CacheInterval |
Sets the amount of time the server control’s data is cached. The default is 0 (zero). This is the amount of time, in seconds, a control’s data is cached. For example, if you want to cache the data for five minutes, set the CacheInterval property to 300 (three hundred). See Also: Caching with Server Controls |
Double |
CustomXml (Code Behind Only) |
Provides a mechanism to inject custom XML into the generated XML before being processed by the XSLT. The injected XML is appended to the end of the XML produced by this control. |
String |
DisplayXslt |
Specify an external XSLT file to render the control. By default, the control uses ProductList.xsl. This file is located in Important: If you want to edit this file, it is strongly recommended that you make a copy, change its name and move it outside your site’s Workarea folder. If you make changes to this file and do not move it out of the Workarea folder, this file and the changes will be lost when you upgrade. |
String |
DoInitFill |
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, FIll is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in codebehind and have it render with your changes shown. |
Boolean |
DynamicParameter |
Sets the QueryString parameter to read a source’s ID dynamically. For example, if your QueryString parameter for a source ID is SID, enter that. See Also: SourceId. |
String |
GetAnalyticsData |
Set to true if you want the average ratings for this product to appear within the product display, as shown below. (Notice the stars below the price of the item.)
Below the rating (shown as one through five stars) is a number indicating how many site visitors have rated the product. Note: For more information on letting customers rate your products, see ContentReview Server Control. Warning! This property only provides reliable data when the Business Analytics Feature is on. Enabling the Business Analytics Feature. |
Boolean |
Hide |
Used to hide the control in design time and run time. True = Hide the control False = Show the control |
Boolean |
IdList |
Enter a comma separated list of IDs when the SourceType property is set to IdList, TaxonomyList or CatalogList. See Also: Source Type Table |
String |
Language |
Set a language for viewing a product list. This property shows results in design-time (in Visual Studio) and at run-time (in a browser). |
Integer |
LoadingImage |
The image to display while the Product List is loading. The default is <siteroot>\Workarea\images |
String |
OrderBy (SortMode property must be set to None) |
For further definition of the values shown here, see the entryProperty enumeration in the API documentation. Documents are located at this URL: http://ektron.com/Resources/Product-Documentation/ AverageRating CatalogId CollItemsDisplayOrder (only available if SourceType property = Collection) ContentStatus CurrencyId EndDate EntryType GoLIve Html Id IsArchived IsBuyable IsPublished LanguageId LastEditDate LastEditorFirstName LastEditorLastName ListPrice Media NumberRated ProductTypeId SalesPrice Sku Status Summary TaxClassId TaxItemsDisplayOrder (only available if SourceType property = Taxonomy) Title ViewCount |
|
PageSize |
Specify the number of items to show per page when a site visitor views the product list. If the number of items exceeds the quantity defined in this property, the list is paged and the site visitor can use the paging navigation system to move through the list. |
Integer |
PageSpan |
The number of pages to show before and after the current page. Enter zero to show all pages. For example, if you set this property to 2 and you are on page four of the product list, you see:
|
Integer |
SortMode |
Select the default way the product list is sorted when a site visitor first views the page. Once the page is loaded, a site visitor can change the sort via a drop down list. Choices are: Title - sorts in alphabetical order. SKU - sorts by the product number. This number is typically a unique number supplied by the producer of the product. Price Descending - sorts by price from highest to lowest. Price Ascending - sorts by price from lowest to highest. Highest Rated - sorts by rating from highest to lowest. Lowest Rated - sorts by rating from lowest to highest. Most Rated - sorts by products that have most ratings from highest to lowest.
None - Use this setting to use OrderBy property. See Also: Sorting the Product List |
SortModes |
The ID of the catalog, collection or taxonomy that is being used as a product list. This property is used when the SourceType property is set to Catalog, Collection or Taxonomy. See Also: Source Type Table |
Integer |
|
SourceType |
The type of source being used to create the list. Choices are: Catalog - use the SourceId property to specify the ID of a single catalog when this source type is selected. CatalogList - use the IdList property to specify a list of catalog IDs when this source type is selected. Taxonomy - use the SourceId property to specify the ID of the single taxonomy when this source type is selected. TaxonomyList - Use IdList property to specify a list of taxonomy IDs when this type is selected. IdList - Use the IdList property to specify a list of product IDs when this source type is selected. Collection - use the SourceId property to specify the ID of a collection when this source type is selected. See Also: Source Type Table |
SourceObjectType |
Stylesheet |
Specify the path to a style sheet for use with this server control. The location can be relative or absolute. |
String |
SuppressWrapperTags |
Suppresses the output of the span/div tags around the control. The default is False. True - Suppress wrap tags. False - Allow wrap tags. |
Boolean |
TaxonomyDepth |
Enter the number of taxonomy levels to retrieve below each taxonomy/category. Only the top level is displayed in the control. The rest of the levels are available through XML in code behind. For example, if the taxonomy is DVDs > Movies > Comedies, and you set Taxonomy Depth to 2, only DVDs and Movies are available in code behind. To retrieve all categories for a taxonomy recursively, enter -1. A depth greater than 1 or using -1 is only useful if you create a custom output using the Taxonomy’s XML. The default value is 1. For a live site, Ektron strongly recommends leaving this value at 1. Increasing this value can slow down your live Web server. However, for testing on a staging server, you can increase the depth. |
Integer |
TemplateProduct |
Specify the URL that contains the Product server control. This allows a site visitor to see the details of the product when the product link is clicked. |
String |